Skip to content

Fix spurious console log errors (Uncaught SyntaxError: Unexpected token o in JSON at position 1) #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 19, 2023

Conversation

chrisglein
Copy link
Collaborator

On the console you'll see a lot of errors like this:

Uncaught SyntaxError: Unexpected token o in JSON at position 1

The reason for that can be found here:
PrismJS/prism#1303
This PR applies the recommended fix for that thread and also tried with this PR: #32

The fix is to add a prism-config.js that sets
disableWorkerMessageHandler: true

Fixes #12

On the console you'll see a lot of errors like this:
> Uncaught SyntaxError: Unexpected token o in JSON at position 1

The reason for that can be found here:
PrismJS/prism#1303
This PR applies the recommended fix for that thread and also tried with
this PR: conorhastings#32

The fix is to add a prism-config.js that sets
`disableWorkerMessageHandler: true`

Fixes conorhastings#12
@KonstantinZhukovskij
Copy link

It didn't help me. I still get an error. Are you sure it works?

@chrisglein chrisglein changed the title Fix spurious console log errors (Uncaught SyntaxError: Unexpected token o in JSON at position 1) Fix spurious console log errors on Windows (Uncaught SyntaxError: Unexpected token o in JSON at position 1) Mar 24, 2023
@chrisglein chrisglein changed the title Fix spurious console log errors on Windows (Uncaught SyntaxError: Unexpected token o in JSON at position 1) Fix spurious console log errors (Uncaught SyntaxError: Unexpected token o in JSON at position 1) Mar 24, 2023
@chrisglein
Copy link
Collaborator Author

It didn't help me. I still get an error. Are you sure it works?

It worked for me? How did you test it?
It should be the same as the fix suggested here (but reduced): #32

@KonstantinZhukovskij
Copy link

Done in exactly the same way, in the debug mode there is still an error.

@chrisglein
Copy link
Collaborator Author

Done in exactly the same way, in the debug mode there is still an error.

Looks like the misunderstanding of how to test the patch was answered here: #32 (comment)

@conorhastings, what would it take to get this PR merged?

@chrisglein
Copy link
Collaborator Author

@conorhastings Ping on what it would take to get this merged?

@conorhastings
Copy link
Owner

@chrisglein sorry i haven't used this library in a long time, i invited you as a collaborator, if there is some permission i missed please let me know but happy to give you merge ability, if you give me your npm handle i can add you three as well

@chrisglein chrisglein merged commit bf1c223 into conorhastings:master Sep 19, 2023
@chrisglein chrisglein deleted the fixConsoleErrors branch September 19, 2023 21:29
@chrisglein
Copy link
Collaborator Author

@chrisglein sorry i haven't used this library in a long time, i invited you as a collaborator, if there is some permission i missed please let me know but happy to give you merge ability, if you give me your npm handle i can add you three as well

I accepted the invite, thanks. Happy to try to help. For npm, this is me.

@conorhastings
Copy link
Owner

@chrisglein invited you as a maintainer, let me know if it didnt go through

@jcubic
Copy link

jcubic commented Dec 28, 2023

Does it mean that the library has an active maintainer?

@chrisglein
Copy link
Collaborator Author

Does it mean that the library has an active maintainer?

As someone who's using the module, I'll try to help out. But there's a lot on my plate.

@jcubic
Copy link

jcubic commented Jan 4, 2024

I created a PR, but someone needs to merge it and release a new version.

Anyway, I created a fork and published it to NPM with my fix included. This is the only way to handle unmaintained projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Console errors in React Native Debug mode
5 participants